package local.blueheart.data.springdatademo.exception;

public class DominoException extends Exception {

    private DominoExceptionEnum dominoExceptionEnum;

    public DominoException() {
        super();
    }

    public DominoException(DominoExceptionEnum dominoExceptionEnum) {
        super(dominoExceptionEnum.getErrorMessage());
        this.dominoExceptionEnum = dominoExceptionEnum;
    }

    public DominoException(Throwable cause, DominoExceptionEnum dominoExceptionEnum) {
        super(dominoExceptionEnum.getErrorMessage(), cause);
        this.dominoExceptionEnum = dominoExceptionEnum;
    }


    public DominoException( Throwable cause, boolean enableSuppression, boolean writableStackTrace,  DominoExceptionEnum dominoExceptionEnum) {
        super(dominoExceptionEnum.getErrorMessage(), cause, enableSuppression, writableStackTrace);
        this.dominoExceptionEnum = dominoExceptionEnum;
    }

    public DominoExceptionEnum getDominoExceptionEnum() {
        return dominoExceptionEnum;
    }

    public void setDominoExceptionEnum(DominoExceptionEnum dominoExceptionEnum) {
        this.dominoExceptionEnum = dominoExceptionEnum;
    }
}

